// Copyright (c) Microsoft Corporation. All rights reserved. See License.txt in the project root for license information.
#pragma once
#include <exception>

namespace Weathr
{
    namespace Web
    {
        class WebException : public std::exception
        {
        protected:
            WebException() = default;
        };

        class WebConnectionException : public WebException
        {
        public:
            WebConnectionException(unsigned long statusCode) : m_statusCode(statusCode)
            {
            }
            unsigned long status_code() const { return m_statusCode; }

        private:
            unsigned long m_statusCode;
        };


        class WebDataException : public WebException
        {
        public:
            WebDataException(const std::wstring& message) : m_message(message)
            {
            }
            std::wstring message() const { return m_message; }

        private:
            std::wstring m_message;
        };
    }
}